package json;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;

import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;

/**
 * JSONTokener是用来读取JSON格式的文件
 * @author Administrator
 *
 */
public class JSONTokenerTest {
	public static void main(String[] args) throws FileNotFoundException, JSONException {
		 JSONObject obj = new JSONObject(new JSONTokener(new FileReader(new File("1.txt"))));  
		 System.out.println(obj.getJSONObject("session").
				 getJSONArray("signing").
				 getJSONObject(0).
				 getJSONObject("author").
				 getString("name"));
	}
}
